<template>
  <el-dialog
    title="工单配置"
    :visible="dialogVisible"
    width="500px"
    @close="handleClose"
  >
    <el-form ref="form">
      <el-form-item prop="num" label="补货警戒线" :rules="[{required: true, message: '请输入1-100的值', trigger: 'blur'}]">
        <el-input-number v-model="num" style="width:350px" label="111" controls-position="right" :min="1" :max="100" />
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <div class="footer">
        <el-button style="background-color:#fbf4f0 !important;color:#655b56!important; border: none" @click="handleClose">取 消</el-button>
        <el-button type="primary" style="background:linear-gradient(135deg,#ff9743,#ff5e20)!important;color:#fff; border: none" @click="handleChange">确 定</el-button>
      </div>
    </span>
  </el-dialog>
</template>

<script>
// import { getautoSupplyConfig, setautoSupplyConfig } from '@/api/table'
export default {
  name: 'DkdElementInputNumber',
  props: {

  },

  data () {
    return {
      num: '',
      dialogVisible: false
    }
  },
  mounted () {
    this.getautoSupplyConfig()
  },

  methods: {
    handleChange () {
      this.setautoSupplyConfig()
      this.handleClose()
      this.$message.warning('演示系统，不支持此操作')
    },
    showDialog () {
      this.dialogVisible = true
    },
    handleClose () {
      this.dialogVisible = false
    },
    async setautoSupplyConfig () {
      // await setautoSupplyConfig(this.num)
      // this.$message.success('工单配置修改成功')
    },
    async getautoSupplyConfig () {
      // const res = await getautoSupplyConfig(1)
      // this.num = res
    }
  }
}
</script>

<style lang="scss" scoped>
::v-deep .el-dialog {
  border-radius: 10px !important;
}
.footer {
  text-align: center !important;
}
</style>
